{% load i18n %}
<div class="row" ng-controller="CartList">
  <div class="col-md-3">

    {% if facet_type == 'layers' %}
    <resource-cart data-facet-type="{{ facet_type }}" selectedString='{% trans "Selection" %}' emptyString="{% trans "No list items selected. Use the selection fields to add." %}" >
    </resource-cart>
    {% endif %}
    <div class="row">
      <div class="col-xs-12">

        {% if user.is_authenticated and facet_type == 'layers' %}
          {% block bulk_perms_button %}
          <div class="btn-group btn-group-justified" role="group" aria-label="tools">
            <div class="btn-group" role="group">
              <button type="button" class="btn btn-default" ng-disabled="!cart.getCart().items.length" ng-click="newMap()">{% trans "Create a Map" %}</button>
            </div>
          </div>
          {% endblock %}
        {% endif %}

        <div class="selections">
            {% trans "Filters" %}
            <a href="." id="clear-search" class="pull-right">{% trans "Clear" %}</a>
        </div>
            {% if SEARCH_FILTERS.TEXT_ENABLED %}
              {% include "search/_text_filter.html" %}
            {% endif  %}
        <div id="slide-pane">
          {% block search_facet_lists %}
            {% if SEARCH_FILTERS.H_KEYWORDS_ENABLED %}
              {% include "search/_h_keywords_filter.html" %}
            {% endif %}
            {% if SEARCH_FILTERS.T_KEYWORDS_ENABLED %}
              {% include "search/_t_keywords_filter.html" %}
            {% endif %}
            {% if SEARCH_FILTERS.TYPE_ENABLED and include_type_filter == 'true' %}
              {% include "search/_type_filters.html" %}
            {% endif %}
            {% include "search/_general_filters.html" %}
            {% if SEARCH_FILTERS.REGION_ENABLED %}
              {% include "search/_region_filter.html" %}
            {% endif %}
            {% if SEARCH_FILTERS.EXTENT_ENABLED %}
              {% include "search/_extent_filter.html" %}
            {% endif %}
          {% endblock search_facet_lists %}
        </div>
      </div>
    </div>
  </div>
  <div class="col-md-9">
    <div class="row">
      <div class="col-md-10">
          {% if facet_type == 'layers' %}
          <span style="font-size: 34px;" ng-bind="total_counts + ' ' + '{% trans "Layers found" %}'"></span>
          {% elif facet_type == 'maps' %}
          <span style="font-size: 34px;" ng-bind="total_counts + ' ' + '{% trans "Maps found" %}'"></span>
          {% elif facet_type == 'documents' %}
          <span style="font-size: 34px;" ng-bind="total_counts + ' ' + '{% trans "Documents found" %}'"></span>
          {% elif facet_type == 'geoapps' %}
          <span style="font-size: 34px;" ng-bind="total_counts + ' ' + '{% blocktrans %}{{GEONODE_APPS_NAME}}{% endblocktrans %} {% trans "found" %}'"></span>
          {% else %}
          <span style="font-size: 34px;" ng-bind="total_counts + ' {{ facet_type | title }} {% trans "found" %}'"></span>
          {% endif %}
      </div>
      <div class="col-md-2">{% include "search/_sort_filters.html" %}</div>
    </div>
    <div class="row">
      <div class="col-md-12 grid-spacer">
        {% include 'base/_resourcebase_snippet.html' %}
        {% include 'search/_pagination.html' %}
      </div>
    </div>
  </div>
  {% include "_bulk_permissions_form.html" %}
</div>
